package com.niit.agricstore.util;

public class PasswordUtils {

    public static boolean hasDigitAndLetter(String password) {
        boolean hasDigit = false;
        boolean hasLetter = false;

        for (char c : password.toCharArray()) {
            if (Character.isDigit(c)) {
                hasDigit = true;
            }
            if (Character.isLetter(c)) {
                hasLetter = true;
            }

            if (hasDigit && hasLetter) {
                return true;
            }
        }

        return false;
    }
}